/// <reference path="../types.ts" />
/// <reference path="../helpers.ts" />
/// <reference path="organization.ts" />

module $Xrm.Messages {
    export class UpdateRequest extends OrganizationRequest {
        public Target: $Xrm.Entity = null;

        constructor() {
            super("Update");
        }

        GetResponse(responseXml: Document): UpdateResponse {
            return new UpdateResponse(responseXml);
        }

        ToSoapXml(): string {
            this.Parameters["Target"] = this.Target;

            return super.ToSoapXml();
        }
    }

    export class UpdateResponse extends OrganizationResponse {
        constructor(responseXml?: Document) {
            super("Update", responseXml);
        }
    }
}